package com.hopscotch.service.impl;

import com.hopscotch.entity.*;
import com.hopscotch.mapper.UserMapper;
import com.hopscotch.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class UserServiceImlp implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public User userLogin(UserLoginVO userLoginVO) {
        User userLogin = userMapper.getUserLogin(userLoginVO);
        //log.debug(String.valueOf(userLogin));
        return userLogin;
    }

    @Override
    public List<User> userGet(UserGetDTO userGetDTO) {
        List<User> user = userMapper.userGet(userGetDTO);
        return user;
    }

    @Override
    public void userDelete(List<String> idList) {
        userMapper.userDelete(idList);
    }

    @Override
    public void userInsert(UserInsertOrUpdateVO userInsertOrUpdateVO) {
        userMapper.userInsert(userInsertOrUpdateVO);
    }

    @Override
    public void userUpdate(UserInsertOrUpdateVO userInsertOrUpdateVO) {
        userMapper.userUpdate(userInsertOrUpdateVO);
    }
}
